Replaces Webpack/Babel/Mocha with Vite/Vitest #484
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
I decided to start with a much smaller problem to tackle, so this only removes Webpack/Babel/Mocha with Vite/Vitest. I chose Vite/Vitest because that it what Easy-UI uses for its builds and tests.
There is a lot of files changed, but all changes are actually pretty minimal. All this does really is:
this.
references in the testsAnd thats effectively it. All commands still work as is. There are no changes to the source, and the output file is effectively the same. This does mean that it hasn't fixed any of the weird issues with using the project in Next.js and stuff. That can come at a later date since that will likely require breaking changes to fix.
Overall, this removes like half of the project's deps, and with it, the security vulnerabilities in exchange for a modern toolset.
Testing
All unit tests are passing. In added another test/check specifically for checking compatibility with older node versions. It basically just imports the project and tries to create a test shipment. This makes it so we can test compatibility with old node versions while not requiring the toolchain to support old node versions.
I also tested it with using actual API calls with a minimal project using node 12 and 22 and saw it working. I also checked node 10 and confirmed that did not work.
Pull Request Type
Please select the option(s) that are relevant to this PR.